<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改地区')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-area-edit" th:object="${preArea}">
            <input name="areaId" th:field="*{areaId}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">地区名称：</label>
                <div class="col-sm-8">
                    <input name="name" th:field="*{name}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">地区状态：</label>
                <div class="col-sm-8">
                    <select class="form-control m-b" name="status" id="selectType">
                        <option value="1" th:selected="*{status} eq '1'">正常</option>
                        <option value="2" th:selected="*{status} eq '2'">低风险</option>
                        <option value="3" th:selected="*{status} eq '3'">中风险</option>
                        <option value="4" th:selected="*{status} eq '4'">高风险</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">父结点ID：</label>
                <div class="col-sm-8">
                    <input name="parentid" th:field="*{parentid}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">根结点ID：</label>
                <div class="col-sm-8">
                    <input name="topid" th:field="*{topid}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">根结点名称：</label>
                <div class="col-sm-8">
                    <input name="topname" th:field="*{topname}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">区号：</label>
                <div class="col-sm-8">
                    <input name="districtcode" th:field="*{districtcode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">证件号：</label>
                <div class="col-sm-8">
                    <input name="idcardcode" th:field="*{idcardcode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">地区编码：</label>
                <div class="col-sm-8">
                    <input name="areacode" th:field="*{areacode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">拼音全拼：</label>
                <div class="col-sm-8">
                    <input name="code" th:field="*{code}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">首字母简写：</label>
                <div class="col-sm-8">
                    <input name="shortcode" th:field="*{shortcode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">hasaqi标识：</label>
                <div class="col-sm-8">
                    <input name="hasaqi" th:field="*{hasaqi}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">树的深度：</label>
                <div class="col-sm-8">
                    <input name="depth" th:field="*{depth}" class="form-control" type="text" required>
                </div>
            </div>

        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "admin/area";
        $("#form-area-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-area-edit').serialize());
            }
        }
    </script>
</body>
</html>
